/* GUI CONVERTED from rspoiq.i (converter v1.76) Thu Jul  4 11:42:31 2002 */
/* rspoiq.i - Release Management Supplier Schedules                         */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.             */
/* $Revision: 1.21 $                                                         */
/*V8:ConvertMode=Report                                                     */
/* REVISION: 7.3    LAST MODIFIED: 09/30/92           BY: WUG *G462*        */
/* REVISION: 7.3    LAST MODIFIED: 05/24/93           BY: WUG *GB29*        */
/* REVISION: 7.3    LAST MODIFIED: 06/11/93           BY: WUG *GB74*        */
/* REVISION: 7.3    LAST MODIFIED: 06/24/93           BY: WUG *GC68*        */
/* REVISION: 7.3    LAST MODIFIED: 07/13/93           BY: WUG *GD42*        */
/* REVISION: 7.3    LAST MODIFIED: 07/13/93           BY: WUG *GD43*        */
/* REVISION: 7.3    LAST MODIFIED: 08/18/93           BY: WUG *GE32*        */
/* REVISION: 7.3    LAST MODIFIED: 06/10/94           BY: dpm *GK23*        */
/* REVISION: 7.3    LAST MODIFIED: 10/31/94           BY: WUG *GN76*        */
/* REVISION: 7.3    LAST MODIFIED: 11/07/94           BY: ljm *GO33*        */
/* REVISION: 7.5    LAST MODIFIED: 03/16/95           BY: dpm *J044*        */
/* REVISION: 7.3    LAST MODIFIED: 03/23/95           BY: bcm *G0J1*        */
/* REVISION: 7.4    LAST MODIFIED: 06/08/95           BY: dxk *G0PM*        */
/* REVISION: 7.4    LAST MODIFIED: 06/08/95           BY: dxk *GOPM*        */
/* REVISION: 7.4    LAST MODIFIED: 10/22/95           BY: vrn *G0YF*        */
/* REVISION: 7.4    LAST MODIFIED: 01/03/96           BY: kjm *G1HR*        */
/* REVISION: 8.5    LAST MODIFIED: 02/26/96     BY: *J0CV* Brandy J Ewing   */
/* REVISION: 8.5    LAST MODIFIED: 06/06/96     BY: *G1XN* Robin McCarthy   */

/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan       */
/* REVISION: 8.6E     LAST MODIFIED: 08/17/98   BY: *L062* Steve Nugent     */
/* REVISION: 8.6E     LAST MODIFIED: 09/02/98   BY: *L08H* A. Shobha        */
/* REVISION: 9.0      LAST MODIFIED: 12/01/98   BY: *K1QY* Suresh Nayak     */
/* REVISION: 9.0      LAST MODIFIED: 03/13/99   BY: *M0BD* Alfred Tan       */
/* REVISION: 9.1      LAST MODIFIED: 10/01/99   BY: *N014* Patti Gaultney   */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb              */
/* REVISION: 9.1      LAST MODIFIED: 08/28/00   BY: *N0P6* Arul Victoria    */
/* Old ECO marker removed, but no ECO header exists *F0PN*                  */
/* Revision: 1.20     BY: Dan Herman      DATE: 05/24/02  ECO: *P018*  */
/* $Revision: 1.21 $    BY: Patrick de Jong      DATE: 07/04/02  ECO: *P086*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* SCHEDULED ORDER INQUIRY INCLUDE */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

define variable l_adg_module like mfc_logical no-undo.

/* SCHEDULE ORDER INQUIRY INCLUDE */

FORM /*GUI*/ 
   pod__qad05 colon 38 label "Generate Ship Schedule From MRP"
   pod__qad07 colon 38 label "SDT Code"
   skip(2)
with STREAM-IO /*GUI*/  frame pod3 side-labels width 80.

/* SET EXTERNAL LABELS */
setFrameLabels(frame pod3:handle).

program:
do:
   print_sch = (po_sch_mthd = ""
   or substring(po_sch_mthd,1,1) = "y"
      or po_sch_mthd = "p"
      or po_sch_mthd = "b").

   edi_sch = (po_sch_mthd = "e" or po_sch_mthd = "b"
      or substring(po_sch_mthd,2,1) = "y").
   fax_sch = substring(po_sch_mthd,3,1) = "y".

   FORM /*GUI*/  with STREAM-IO /*GUI*/  frame prm.
   /* SET EXTERNAL LABELS */
   setFrameLabels(frame prm:handle).
   display
      scx_po
      scx_line
      scx_part
      pod_vpart
      pod_um
      scx_shipfrom
      ad_name
      scx_shipto
   with frame prm STREAM-IO /*GUI*/ .

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   pocmmts = (po_cmtindx <> 0 or (new po_mstr and poc_hcmmts)).

   impexp = no.

   if can-find( first ie_mstr
      where ie_type = "2" and ie_nbr = po_nbr ) then impexp = yes.

   FORM /*GUI*/  with STREAM-IO /*GUI*/  frame po1.
   /* SET EXTERNAL LABELS */
   setFrameLabels(frame po1:handle).
   display
      po_ap_acct
      po_ap_sub
      po_ap_cc
      po_shipvia
      po_taxable
      po_fob
      po_cr_terms
      po_buyer
      po_bill
      po_ship
      po_contact
      print_sch
      po_contract
      edi_sch
      fax_sch
      po_curr
      pocmmts
      po_site
      po_consignment
      impexp
   with frame po1 STREAM-IO /*GUI*/ .

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   if using_supplier_consignment and po_consignment then do:
      {pxrun.i &PROC='displayAgingDays'
               &PARAM="(input po_max_aging_days)"}
      hide frame aging2.
      
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

   end.

   hide frame po1.

   /* HEADER COMMENTS */
   if pocmmts then do:
      FORM /*GUI*/ 
         cmt_cmmt[1] no-label
      with STREAM-IO /*GUI*/  frame cmmts_data down width 80 attr-space
      title color normal (getFrameTitle("TRANSACTION_COMMENTS",78)).

      for each cmt_det no-lock where cmt_indx = po_cmtindx:
         do i = 1 to 15:
            if cmt_cmmt[i] > "" then do:
               display cmt_cmmt[i] @ cmt_cmmt[1] with frame
                  cmmts_data STREAM-IO /*GUI*/ .
               down 1 with frame cmmts_data.
               
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

            end.
         end.
      end.

      hide frame cmmts_data.
   end.

   hide frame po1.

   podcmmts = (pod_cmtindx <> 0 or (new pod_det and poc_lcmmts)).

   FORM /*GUI*/  with STREAM-IO /*GUI*/  frame pod1.
   /* SET EXTERNAL LABELS */
   setFrameLabels(frame pod1:handle).
   display
      pod_pr_list
      pod_cst_up
      pod_pur_cost
      pod_acct
      pod_sub
      pod_cc
      pod_loc
      pod_taxable
      pod_um
      pod_um_conv
      pod_type
      pod_consignment
      pod_wo_lot
      pod_op
      subtype
   with frame pod1 STREAM-IO /*GUI*/ .

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   /* DISPLAY ERS INFORMATION IF ERS PROCESSING IS ENABLED */
   if poc_ers_proc then do with frame pers:
      /* SET EXTERNAL LABELS */
      setFrameLabels(frame pers:handle).
      display
         pod_ers_opt   colon 15
         pod_pr_lst_tp colon 55
      with frame pers side-labels width 80 no-attr-space STREAM-IO /*GUI*/ .

      hide frame pers.
      
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

   end.

   if using_supplier_consignment and pod_consignment then do:
      {pxrun.i &PROC='displayAgingDays'
               &PARAM="(input pod_max_aging_days)"}
      hide frame aging2.
      
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

   end.

   hide frame pod1.

   FORM /*GUI*/  with STREAM-IO /*GUI*/  frame pod2.
   /* SET EXTERNAL LABELS */
   setFrameLabels(frame pod2:handle).
   display
      pod_firm_days
      pod_sd_pat
      pod_plan_days
      pod_plan_weeks
      pod_cum_qty[3]
      pod_plan_mths
      pod_ord_mult
      pod_fab_days
      pod_cum_date[1]
      pod_raw_days
      podcmmts
      pod_sftylt_days
      pod_vpart
      pod_translt_days
      pod_start_eff[1]
      pod_end_eff[1]
      pod_pkg_code
   with frame pod2 STREAM-IO /*GUI*/ .

   /* The flag on the control file rsc_ctrl and mfc_ctrl would always
   be maintained in sync. So we test the value of mfc_ctrl flag */

   l_adg_module = no.
   if can-find(first mfc_ctrl where
      mfc_field = "enable_shipping_schedules"
      and mfc_seq = 4 and mfc_module = "ADG"
      and mfc_logical = yes) then
      l_adg_module = yes.
   else
      l_adg_module = no.

   if l_adg_module then do:
      display
         pod__qad05
         pod__qad07
      with frame pod3 STREAM-IO /*GUI*/ .
   end. /* if l_adg_module */

   hide frame pod2.
   hide frame pod3.

   
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/


   /* LINE COMMENTS */
   if podcmmts then do:
      FORM /*GUI*/ 
         cmt_cmmt[1] no-label
      with STREAM-IO /*GUI*/  frame cmmts_data down width 80 attr-space
      title color normal (getFrameTitle("TRANSACTION_COMMENTS",78)).

      for each cmt_det no-lock where cmt_indx = pod_cmtindx:
         do i = 1 to 15:
            if cmt_cmmt[i] > "" then do:
               display cmt_cmmt[i] @ cmt_cmmt[1] with frame
                  cmmts_data STREAM-IO /*GUI*/ .
               down 1 with frame cmmts_data.
               
/*GUI*/ {mfguichk.i  &warn=false &label=program} /*Replace mfrpchk*/

            end.
         end.
      end.

      hide frame cmmts_data.
   end.

   page.
end.
